.sticky-panel {
	// Force a new block formatting context to prevent margin collapsing. It's needed for
	// correct measurement of `.sticky_panel__content` height and setting the spacer height.
	// This seems to only affect the stats section. Applying it everywhere causes issue with
	// :focus on child elements. (i.e. themes)
	.is-section-stats & {
		overflow: hidden;
	}
}

.sticky-panel__content {
	position: relative;
	// Makes the bottom margin of the inner element contribute to its height
	// so that the `StickyPanel` component can determine the height correctly.
	display: flow-root;
}

.sticky-panel.is-sticky .sticky-panel__content {
	position: fixed;
	z-index: z-index("root", ".sticky-panel.is-sticky .sticky-panel__content");
}
